<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
    <style>
        #app{
            text-align: center;
        }
        .dialog{
            width: 100px;
            height: 100px;
            border: 1px solid #333;
            margin: 60px auto;
            text-align: center;
            line-height: 100px;
        }
        .bounce-enter-active {
            animation: bounce-in 400ms;
        }
        .bounce-leave-active {
            animation: bounce-out 300ms;
        }
        @keyframes bounce-in {
            0% {
                transform: scale(0.7);
            }
            50% {
                transform: scale(1.3);
            }
            100% {
                transform: scale(1);
            }
        }
        @keyframes bounce-out {
            0% {
                transform: scale(1);
            }
            100% {
                transform: scale(0.4);
            }
        }
    </style>
    </head>
    <body>
        <div id = "app">
            <button v-on:click = "show = !show">{{ show ? '隐藏 Dialog' : '显示 Dialog'}}</button>
            <transition name = "bounce">
                <p v-show = "show" class="dialog">Dialog...</p>
            </transition>
        </div>
    </body>
    <script src="../../js/vue.js"></script>
    <script type = "text/javascript">
        var vm = new Vue({
            el: '#app',
            data: {
                show:false
            }
        });
    </script>
</html>
